build_guard "curl" || return

source "$BUILD_TOOL_ROOT/build-script/zlib.sh"
source "$BUILD_TOOL_ROOT/build-script/openssl.sh"

print_title "Build for curl" && cd "$BUILD_TOOL_DEP_ROOT/curl"
cmake -S . -B "build" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH=OFF -DCURL_USE_LIBSSH2=OFF -DUSE_LIBIDN2=OFF -DUSE_NGHTTP2=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
cmake --build "build" --config Release --target install

: '
Usage:
find_package(CURL CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)

`CURL::libcurl` consists `OpenSSL::SSL`, `OpenSSL::Crypto` and `ZLIB::ZLIB`.
'
